package com.xcjh.smartchat.net

import com.xcjh.base_lib.bean.ApiResponse
import com.xcjh.base_lib.bean.GoodsBean
import okhttp3.MultipartBody
import okhttp3.ResponseBody
import okio.BufferedSource
import retrofit2.http.*

/**
 *
 */
interface ApiComService {

    companion object {
        // const val SERVER_URL = "https://testing.slscore.cn/"
        // const val SERVER_URL = "http://192.168.101.180:2020/"
        const val SERVER_URL = "http://192.168.101.180:2020/"
    }

    /**
     * 注册
     */
    @FormUrlEncoded
    @POST("user/register")
    suspend fun register(@Field("username") username: String): ApiResponse<Any>

    /**
     * 获取Country数据
     */
    @GET("xcjh/match/Category/getDataCategory")
    suspend fun getCountry(): ApiResponse<ArrayList<Any>>

    /**
     * 获取Country数据
     */
    @GET("xcjh/match/Category/getDataCategory")
    suspend fun selectRoleArticle(): ApiResponse<ArrayList<GoodsBean>>

    /**
     * 字节流测试
     */
    @Streaming
    @GET("answer/sse")
    suspend fun streamTest(): ResponseBody

}